﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Soft
{
    [Serializable]
    public sealed class CarrierJson : InvokeResult
    {

        public CarrierJson()
        {
        }


        public CarrierJson(IResult result) : base(result)
        {
        }


        public CarrierJson(string error) : base(error)
        {
        }


        public CarrierJson(Exception e) : base(e)
        {
        }


        /// <summary>
        /// 传输时间
        /// </summary>
        public long TransmittedMilliseconds { get; set; }


        /// <summary>
        /// 从invokeResult中获取数据
        /// </summary>
        /// <param name="invokeResult"></param>
        public void GetData(InvokeResult invokeResult)
        {
            base.ReceiveResult(invokeResult);
            base.IsVoid = invokeResult.IsVoid;
            base.Json = invokeResult.Json;
            base.DataType = invokeResult.DataType;
            base.CallMilliseconds = invokeResult.CallMilliseconds;
        }


    }
}
